package com.pmsystem.dao;

import com.pmsystem.pojo.Accident;
import com.pmsystem.pojo.AccidentExample;
import com.pmsystem.pojo.SecurityMis;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface AccidentMapper {
    long countByExample(AccidentExample example);

    int deleteByExample(AccidentExample example);

    int deleteByPrimaryKey(Integer accidentId);

    int insert(Accident record);

    int insertSelective(Accident record);

    List<Accident> selectByExample(AccidentExample example);

    Accident selectByPrimaryKey(Integer accidentId);

    int updateByExampleSelective(@Param("record") Accident record, @Param("example") AccidentExample example);

    int updateByExample(@Param("record") Accident record, @Param("example") AccidentExample example);

    int updateByPrimaryKeySelective(Accident record);

    int updateByPrimaryKey(Accident record);
    
    
    /**  
	 * <p>Title: selectAllAccidentCount</p >  
	 * <p>Description:查询重大事件数据总条数</p >  
	 * @author 魏家洛
	 * @return  
	 */  
	int selectAccidentCount(@Param("condition")String condition,@Param("time")String time);
	/**  
	 * <p>Title: selectAccidentPage</p >  
	 * <p>Description: 通过开始索引和数量查询重大事件对应数据</p >  
	 * @author 魏家洛
	 * @param start
	 * @param pageSize
	 * @return  
	 */  
	List<Map<String, Object>> selectAccidentPage(@Param("start") Integer start,@Param("pageSize") Integer pageSize,
			@Param("condition")String condition,@Param("time")String time);

	/**  
	 * <p>Title: deleteAccidentById</p >  
	 * <p>Description: 通过id删除重大事件数据</p >  
	 * @author 魏家洛
	 * @param id
	 * @return  
	 */  
	int deleteAccidentById(Integer id);

	/**  
	 * <p>Title: selectAccidentById</p >  
	 * <p>Description:通过重大事件id查找重大事件数据</p >  
	 * @author 魏家洛
	 * @param id
	 * @return  
	 */  
	Accident selectAccidentById(Integer id);

	/**  
	 * <p>Title: updateAccidentByAccident</p >  
	 * <p>Description:更新重大事件信息 </p >  
	 * @author 魏家洛
	 * @param accident
	 * @return  
	 */  
	int updateAccidentByAccident(Accident accident);

	/**  
	 * <p>Title: addAccident</p >  
	 * <p>Description:添加重大事件数据 </p >  
	 * @author 魏家洛
	 * @param accident
	 * @return  
	 */  
	int addAccident(Accident accident);
}